package com.qcby.dao;

import com.qcby.common.MyExam.ResData;
import com.qcby.common.MyExam.ShowByPage;
import com.qcby.entity.Exam;
import com.qcby.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MyTestDao {
    List<ResData> showExamInfoByPage(ShowByPage info);

    List<ResData> showExamInfoByPageFromTeacher(ShowByPage info);

    List<ResData> showExamInfoByPageFromStudentNote(ShowByPage info);

    List<ResData> showExamInfoByPageFromErrorCollection(ShowByPage info);

    int updateStatusToweikaishi(ResData info);

    int updateStatusTojinxingzhong(ResData info);

    int updateStatusToyijieshu(ResData info);

    int getExamCount(ShowByPage info);

    int getExamCountFromTeacher(ShowByPage info);

    int getExamCountFromStudentNote(ShowByPage info);

    int getExamCountFromErrorCollection(ShowByPage info);

    Exam getExamIdByInfo(
        @Param("name") String name,
        @Param("creator") String creator,
        @Param("createtime") String createtime,
        @Param("examtime") String examtime
    );

    Student getStudentIdByName(String name);

    List<ResData> getAllExamIdBySid(int sid);

    ResData getExamInfoByEid(int eid);

    void updateExamStateDynamically(ResData info);
}
